<script language="javascript" type="text/javascript">

	function PrintPage(url)
	{
		// Open the window to print this page
		var x = window.open(url, "PrintQuestion", "toolbar=1, scrollbars=1");
	}

	function EmailToFriend(url)
	{
		xPos = screen.availWidth / 2 - 250;
		yPos = screen.availHeight / 2 - 215;

		// Open the window to email this question to a friend
		var y = window.open(url, "EmailQuestion", "width=500, height=430, toolbar=1, scrollbars=1, left=" + xPos + ", top=" + yPos);
	}

	function ToggleWhyTextbox(f)
	{
		if (f.value == 0) {
			document.getElementById('why').style.display='block';
		} else {
			document.getElementById('why').style.display='none';
		}
	}

	function CheckFormRating(f)
	{
		if (f.rate[1].value == 0 && f.rate[1].checked) {
			if (f.ratingmessage.value == '') {
				alert('%%LNG_WhyUnhelpfulRequired%%');
				return false;
			}

			if (f.ratingmessage.value == '%%LNG_WhyUnhelpful%%') {
				alert('%%LNG_WhyUnhelpfulRequired%%');
				return false;
			}

			var email_address = document.getElementById("ratingemail").value;

			if ((email_address != "") && (email_address != "%%LNG_WhyUnhelpfulEmail%%")) {
				if (!checkemail(email_address)) {
					alert("%%LNG_questValidEmail%%");
					return false;
				}
			}
		}

		return true;
	}

	function ResetWhy(f)
	{
		if (f.value == '') {
			f.value='%%LNG_WhyUnhelpful%%';
			f.style.color = 'gray';
		}
	}

	function ClearWhy(f)
	{
		if (f.value == '%%LNG_WhyUnhelpful%%') {
			f.value='';
			f.style.color = 'black';
		}
	}

	function ResetWhyEmail(f)
	{
		if (f.value == '') {
			f.value='%%LNG_WhyUnhelpfulEmail%%';
			f.style.color = 'gray';
		}
	}

	function ClearWhyEmail(f)
	{
		if (f.value == '%%LNG_WhyUnhelpfulEmail%%') {
			f.value='';
			f.style.color = 'black';
		}
	}

</script>

	<table class="BodyPanel" align="center" cellspacing="0" cellpadding="0">
	<tr>
		<td class="Heading2" id="title">%%GLOBAL_Title%%</td>
	</tr>
	<tr>
		<td class="Answer">
			<span id="answer">%%GLOBAL_Answer%%</span>
			<br /><br />
			<div style="display:none">
				<table class="BoxText">
					<tr>
						<td class="BoxHeading"><b>%%LNG_questUserOpinions%%</b> (%%GLOBAL_TotalVotes%% %%GLOBAL_VotesString%%)</td>
					</tr>
					<tr>
						<td>
							%%GLOBAL_RatingData%%
						</td>
					</tr>
				</table>
				<hr size="1" noshade>
				<form action="%%GLOBAL_RateUrl%%" method="post" onsubmit="return CheckFormRating(this);">
				<table border="0" class="BoxText" style="display: %%GLOBAL_HideRatingPanel%%">
				<tr>
					<td class="BoxHeading">
						<b>%%LNG_questHowRate%%</b>
					</td>
				</tr>
				<tr>
					<td>
						<input type="radio"name="rate" value="1" CHECKED onclick="ToggleWhyTextbox(this);"> %%LNG_questThumbsUp%%
					</td>
				</tr>
				<tr>
					<td>
						<input type="radio" name="rate" value="0" onclick="ToggleWhyTextbox(this);"> %%LNG_questThumbsDown%%
						<div id="why" style="display: none;">
						<textarea name="ratingmessage" cols="12" rows="5" style=" font-size: 12px; color: gray;" onfocus="ClearWhy(this);" onblur="ResetWhy(this);">%%LNG_WhyUnhelpful%%</textarea>
						<br />
						<input type="text" name="ratingemail" id="ratingemail" value="%%GLOBAL_uhrEmail%%" style="font-size: 12px; color: gray; width: 110px;" onfocus="ClearWhyEmail(this);" onblur="ResetWhyEmail(this);" />
						</div>
					</td>
				</tr>
				<tr>
					<td>
						<input type="submit" value="%%LNG_RateIt%%" class="BoxText" style="margin-top:5px">
					</td>
				</tr>
				</table>
				</form>
				<table border="0" class="BoxText" style="display: %%GLOBAL_HideRatedPanel%%">
					<tr>
						<td>
							%%LNG_questAlreadyRated%%
						</td>
					</tr>
				</table>
				
			</div>
		</td>
	</tr>
	<tr>
		<td>
			<div class="Container" style="display:%%GLOBAL_HideCommentOnPage%%;">
				<h3>%%LNG_questVisitorComments%%</h3>
				%%GLOBAL_Comments%%
				
				%%Panel.SubmitCommentPanel%%
			</div>
		</td>
	</tr>
	</table>
